function init() {
  const dp = new DPlayer({
    element: document.getElementById("dplayer"),
    video: {
      //  pic: videoInfo.img, // 封面
      url: "https://vod3.bdzybf3.com/20210509/ZMHA3RpS/1000kb/hls/index.m3u8",
      type: "customHls",
      customType: {
        customHls: function (video, player) {
          const hls = new Hls();
          hls.loadSource(video.src);
          hls.attachMedia(video);
        },
      },
    },
  });
}
var vm = new Vue({
  el: "#playPage",
  data: {
    posterList: [
      {
        id: "001",
        imgUrl: "images/list/poster.jpg",
        title:
          "1北京城市学院科协与门头沟区科协合作开展特色科普活动——科学跨年夜",
      },
      {
        id: "002",
        imgUrl: "images/list/poster.jpg",
        title:
          "2北京城市学院科协与门头沟区科协合作开展特色科普活动——科学跨年夜",
      },
      {
        id: "003",
        imgUrl: "images/list/poster.jpg",
        title:
          "3北京城市学院科协与门头沟区科协合作开展特色科普活动——科学跨年夜",
      },
    ],
    mySwiper: null,
  },
  computed: {
    swiperactiveIndex() {
      
      if (this.mySwiper) return this.mySwiper.realIndex;
      else return 0;
    },
  },
  mounted: function () {
    this.mySwiper = new Swiper("#swiper-poster-container", {
      autoplay: 3000, //可选选项，自动滑动
      loop: true,
      nextButton: ".swiper-button-next",
      prevButton: ".swiper-button-prev",
      pagination: ".swiper-pagination",
      paginationType: "fraction",
    });
  },
  methods: {
    onPageChange(page) {
      console.log("page: ", page);
    },
  },
});
var mySwiper1 = new Swiper("#swiper-ad-container", {
  autoplay: 3000, //可选选项，自动滑动
  loop: true,
});


var mySwiper3 = new Swiper("#swiper-bottom-container", {
  autoplay: 3000, //可选选项，自动滑动
  loop: true,
});
